﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common_Library.Infrastructure;
using Common_Library.Parts_of_map;

namespace GamePlay_Preview.PlayersTools
{
    public static class ConsoleWriter
    {
        public static void DisplayMoveHistory(List<PlayerState> moveHistory)
        {
            Console.WriteLine("Historia:");
            foreach (var item in moveHistory)
                Console.WriteLine(item + " punkty: " + item.PlayerScore);
            Console.WriteLine("------------------");
        }

        public static void DisplayPossibleMoves(List<PossibleAction> possibleMoves)
        {
            Console.WriteLine("Możliwe ruchy w rundzie:");
            foreach (var i in possibleMoves)
            {
                Console.WriteLine(i.Action + " " + i.MoveDirection);
            }
            Console.WriteLine("------------------");
        }

        public static void DisplayStatesComparison(PlayerState state1, PlayerState state2)
        {
            Console.WriteLine();
            Console.WriteLine(state1 + "<::::>" + state2);
        }

        public static void DisplayMove(PlayerState state)
        {
            Console.WriteLine();
            Console.WriteLine("Wybrany ruch: " + state);
            Console.WriteLine("------------------");
        }

        public static void DisplaySegmentList(List<Segment> segments)
        {
            Console.WriteLine("Segmenty:");
            foreach (var segment in segments)
            {
                Console.WriteLine("Segment (" + segment.X + ", " + segment.Y + ")");
            }
            Console.WriteLine("------------------");
        }

        public static void DisplaySegment(Segment segment)
        {
            Console.WriteLine();
            Console.WriteLine("Segment (" + segment.X + ", " + segment.Y + ")" + " " + segment.Color);
            Console.WriteLine("------------------");
        }
    }
}
